Strip the enclosing package's lower-case name from a library's dir name #3883
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3882
I wish I could write a unit test for this fix but it would be a lot of work, and I fear making too small a unit test (like literally just mocking out a package name to be 'Flutter' and basically just testing
toLowerCase
) would be unhelpful. To make a less mock-y test, with a real SDK-provided 'Flutter' package, and documenting dependencies, and running dartdoc how Flutter does, would be fragile and very complex.In any case, I did manually check this fix:
dart tool/task.dart doc flutter
; see that the generated HTML has theflutter/widgets/widgets-library.html
path for the widgets library.create_api_docs.dart
command that is printed out in the first step; see that the generated HTML still has the correct path.Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.